﻿using Microsoft.EntityFrameworkCore;
using OpenCvSharp;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Diagnostics.CodeAnalysis;

namespace RemoteSensingImageDirectServer.Models.Map.Cache
{
    //联合索引
    [Index(nameof(GroupName), nameof(CreateBy))]
    public class GroupImageCache
    {
        /// <summary>
        /// 缓存联合图层主键
        /// </summary>
        [Key]
        public string Key { get; set; }

        /// <summary>
        /// 联合图层名称
        /// </summary>
        public string GroupName { get; set; }

        /// <summary>
        /// 缓存的表名称
        /// </summary>
        public string TableName { get; set; }

        /// <summary>
        /// 图层配置信息
        /// </summary>
        public string MapConfig { get; set; }

        /// <summary>
        /// 创建用户
        /// </summary>
        public string CreateBy { get; set; }

        /// <summary>
        /// 支持多线程共同访问的数据(多线程加速)
        /// </summary>
        public byte[] VrtData { get; set; }

        /// <summary>
        /// 外键关键表(主键表)
        /// </summary>
        public ICollection<GroupImageWarpCache> GroupImageWarps { get; set; }
    }
}
